Skip to content

Instantly share code, notes, and snippets.

@msankhala
msankhala / nginx-ssl-config
Created September 9, 2020 06:50 — forked from apollolm/nginx-ssl-config
Nginx Configuration with multiple port apps on same domain, with SSL.
# the IP(s) on which your node server is running. I chose port 3000.
upstream app_geoforce {
server 127.0.0.1:3000;
}
upstream app_pcodes{
server 127.0.0.1:3001;
}
@ping
ping / bookmarklet.js
Last active November 20, 2024 22:24
Bookmarklet to add download links for audiobooks in the Overdrive loans page
/* 1. Paste this entire gist over at https://mrcoles.com/bookmarklet/ to generate a bookmarklet */
/* 2. Use a meaningful Name like: 🎧 📖 Links */
/* 3. Drag the generated bookmarklet link to your Bookmarks Toolbar. */
/* 4. Click on the bookmarklet when you're on the Overdrive loan page, e.g. https://yourlibrary.overdrive.com/account/loans */
/* 5. The "Download MP3 audiobook" link should appear like it used to. */
$('a[data-format-id="audiobook-overdrive"]').each(function() {
var listenBtn = $(this);
if (listenBtn.hasClass('script-added')) {
@irazasyed
irazasyed / outbound-email-with-cloudflare.md
Last active November 20, 2024 22:24
Using Gmail SMTP with Cloudflare Email Routing: A Step-by-Step Guide

Using Gmail SMTP with Cloudflare Email Routing: Step-by-Step Guide

Learn how to send emails through Gmail SMTP with Cloudflare Email Routing in this comprehensive guide.

Step 1: Enable 2-Factor Authentication

To proceed with this method, ensure that you have enabled two-factor authentication for your Google account. If you haven't done so already, you can follow the link to set it up → Enable 2FA in your Google account.

Step 2: Create an App Password for Mail

@ConnerWill
ConnerWill / ANSI-escape-sequences.md
Last active November 20, 2024 22:24
ANSI Escape Sequences cheatsheet

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
import pygame
from pygame.locals import *
from OpenGL.GL import *
from OpenGL.GLU import *
from PIL import Image
import numpy as np
# Cube vertices and faces
vertices = [
[1, 1, -1],
#!/bin/bash
# Get a list of all volumes
volumes=$(podman volume ls -q)
#get timestamp for unique filename
timestamp=$(date +"%Y%m%d%H%M%S")
# Pause all running containers
echo "Pausing containers for backup"
podman pause $(podman ps -q)
@veekaybee
veekaybee / normcore-llm.md
Last active November 20, 2024 22:18
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@StuartGordonReid
StuartGordonReid / OverlappingPatterns.py
Created August 25, 2015 16:02
Python implementation of the Overlapping Patterns cryptographic test for randomness
def overlapping_patterns(self, bin_data: str, pattern_size=9, block_size=1032):
"""
Note that this description is taken from the NIST documentation [1]
[1] http://csrc.nist.gov/publications/nistpubs/800-22-rev1a/SP800-22rev1a.pdf
The focus of the Overlapping Template Matching test is the number of occurrences of pre-specified target
strings. Both this test and the Non-overlapping Template Matching test of Section 2.7 use an m-bit
window to search for a specific m-bit pattern. As with the test in Section 2.7, if the pattern is not found,
the window slides one bit position. The difference between this test and the test in Section 2.7 is that
when the pattern is found, the window slides only one bit before resuming the search.
@thibaudcolas
thibaudcolas / dsf-turnout.md
Created November 19, 2024 22:16
DSF elections voter turnout

Over recent elections the data is readiliy available for

Elections Total voters Votes over first 7 days Total votes % 7 days % total
2025 DSF Board 374 76 204 20% 55%
2024 DSF Board 287 93 132 32% 46%
5.x Steering Council 268 74 74 28% 28%
2023 DSF Board 244 58 91 24% 37%